package com.sskj.aikeeper.presenter;

import com.lzy.okgo.model.Response;
import com.sskj.aikeeper.hangqing.fragment.CoinListFragment;
import com.sskj.common.base.HttpData;
import com.sskj.lib.bean.CoinBean;
import com.sskj.lib.http.JsonCallBack;

import java.util.List;

/**
 * @author Hey
 * Create at  2019/06/25
 */
public class CoinListPresenter extends BasePresenter<CoinListFragment> {


    public void getHangqingData(String mark) {
        httpService.getHangqingData(mark)
                .tag(this)
                .execute(new JsonCallBack<HttpData<List<CoinBean>>>(this) {
                    @Override
                    public void onSuccess(Response<HttpData<List<CoinBean>>> response) {
                        mView.getHangqingDataOK(response.body().getData());
                    }
                });
    }

}
